Skip to content

Conversation

@cnrudd
Copy link
Member

@cnrudd cnrudd commented Dec 17, 2025

Main Change:

Dash Canvas supports dragging in widgets from a "widget well".
review with new toolbox branch: https://github.com/xh/toolbox/tree/drag-onto-dash-canvas

Upgrades react-grid-layout to v2.2.2 to get their latest fixes.

  • now supports 'wrap' compacting (probably not likely to be used very often)

Brings in 3 new hoist components:

  1. DashCanvasWidgetWell
  2. CollapsibleSet
  3. CollapsibleSetButton

Brings in 2 new tags:

  1. fieldset
  2. legend
Screenshot 2026-01-08 at 2 36 42 PM

Hoist P/R Checklist

Pull request authors: Review and check off the below. Items that do not apply can also be
checked off to indicate they have been considered. If unclear if a step is relevant, please leave
unchecked and note in comments.

If your change is still a WIP, please use the "Create draft pull request" option in the split
button below to indicate it is not ready yet for a final review.

Pull request reviewers: when merging this P/R, please consider using a squash commit to
collapse multiple intermediate commits into a single commit representing the overall feature
change. This helps keep the commit log clean and easy to scan across releases. PRs containing a
single commit should be rebased when possible.

core/elem.ts Outdated
//------------------------
// Implementation
//------------------------
function normalizeArgs(args: any[], type: any) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice cleanup!

core/elem.ts Outdated
items?: ReactNode;

/** Equivalent to `items`, offered for code clarity when only one child is needed. */
item?: Some<ReactNode>;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could go either way here.

* customize how the size of the dropping placeholder is calculated. The callback should
* return an object with optional properties indicating the desired width, height (in grid units),
* and offset (in pixels) of the dropping placeholder.
* If not provided, Hoist's own default logic will be used.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Last sentence is implicit.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the meaning of false and void here for this type?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added more to that doc block to answer those questions.

Copy link
Member

@lbwexler lbwexler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we have a separate PR for (a) the upgrade and proposed hoist changes and (b) the ability to drop widgets?

* customize how the size of the dropping placeholder is calculated. The callback should
* return an object with optional properties indicating the desired width, height (in grid units),
* and offset (in pixels) of the dropping placeholder.
* If not provided, Hoist's own default logic will be used.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the meaning of false and void here for this type?

maxRows: number;
droppable: boolean;
onDropDone: (viewModel: DashCanvasViewModel) => void;
draggedInView: DashCanvasItemState;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find these name a bit confusing.

  • "droppable" might be "allowsDrop"

  • "draggedInView" might be 'droppedView'

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have made this change: "droppable" might be "allowsDrop"

I'm not sure changing "draggedInView" to 'droppedView' is correct. "draggedInView" refers to a view that has been dragged in, but not yet dropped.

}

onDropDragOver(evt: DragEvent):
| {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need a type for the return -- if going to appear like this.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done.

@cnrudd cnrudd changed the title React Grid Layout upgrade to 2.1.0 + add ability to drop widgets in from outside. React Grid Layout upgrade to 2.1.1 + add ability to drop widgets in from outside. Dec 23, 2025
@cnrudd
Copy link
Member Author

cnrudd commented Dec 23, 2025

can we have a separate PR for (a) the upgrade and proposed hoist changes and (b) the ability to drop widgets?
Sure, of course, no problem.
Upgrade only PR: #4190

@cnrudd cnrudd marked this pull request as draft December 23, 2025 18:53
@cnrudd cnrudd changed the title React Grid Layout upgrade to 2.1.1 + add ability to drop widgets in from outside. Dash Canvas: add ability to drop widgets in from outside. Dec 23, 2025
cnrudd added 2 commits January 2, 2026 10:23
"Warning:(65, 11)  Dependency npm:qs:6.14.0 is vulnerable CVE-2025-15284 7.5 arrayLimit bypass in bracket notation allows DoS via memory exhaustion  Results powered by Mend.io"
"numbro": "~2.5.0",
"onsenui": "~2.12.8",
"qs": "~6.14.0",
"qs": "~6.14.1",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update qs dep to resolve this code analysis warning:
"Warning:(65, 11) Dependency npm:qs:6.14.0 is vulnerable CVE-2025-15284 7.5 arrayLimit bypass in bracket notation allows DoS via memory exhaustion Results powered by Mend.io"

/**
* @param config - TabContainer configuration.
* @param [depth] - Depth in hierarchy of nested TabContainerModels. Not for application use.
* @param depth - Depth in hierarchy of nested TabContainerModels. Not for application use.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated linting change

/**
* Begin an inline editing session.
* @param record - StoreRecord/ID to edit. If unspecified, the first selected StoreRecord
* @param opts.record - StoreRecord/ID to edit. If unspecified, the first selected StoreRecord
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated linting change

cnrudd added 5 commits January 2, 2026 13:02
…quently add wrap compact option, and use new dropConfig.onDragOver key.
DashCanvasWidgetWell
CollapsibleFieldSet
FieldsetCollapseButton
@cnrudd cnrudd marked this pull request as ready for review January 8, 2026 19:38
@amcclain
Copy link
Member

For discussion - would something like widgetChooser be a bit more natural than widgetWell?

@cnrudd
Copy link
Member Author

cnrudd commented Jan 21, 2026

For discussion - would something like widgetChooser be a bit more natural than widgetWell?

No objections.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants